package com.open4cn.simulator.config.config;

import com.open4cn.simulator.core.device.IDeviceStatusRepository;
import com.open4cn.simulator.device.DeviceStatusManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author yinxiaopeng
 * @version 1.0.0
 * @company 致景科技
 * @department 飞梭BU/研发
 * @description
 * @Email yinxiaopeng@zj.tech
 * @date 2022-05-15 17:36
 */
@Configuration
public class DeviceStatusRepositoryConfig {

    @Bean
    public IDeviceStatusRepository dbDeviceStatusRepository(IDeviceStatusRepository deviceStatusServer) {
        DeviceStatusManager.getInstance().setRepository(deviceStatusServer);
        return deviceStatusServer;
    }

}
